/* ==================================================================   
 * Created [2009-4-27 下午11:32:55] by Jon.King 
 * ==================================================================  
 * TSS 
 * ================================================================== 
 * mailTo:jinpujun@hotmail.com
 * Copyright (c) Jon.King, 2009-2012 
 * ================================================================== 
*/

package com.jinhe.tss.component.dynproperty.support;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import javax.persistence.MappedSuperclass;
import javax.persistence.Transient;

import com.jinhe.tss.component.support.persistence.entityaop.OperateInfo;
import com.jinhe.tss.core.persistence.IEntity;

/** 
 * <p> AbstractDynEntity.java </p> 
 * 
 * 动态实体基类
 */
@MappedSuperclass
public abstract class AbstractDynEntity extends OperateInfo implements IEntity {
    
    public abstract String getEntityCode();
    
    public abstract Long getId();
    
    /**
     * 继承该类的子类中的getAttributesForXForm()方法里必须将动态属性值的Map一并加入
     */
    @Transient
    protected Map<String, Object> dynpropertiesMap = new HashMap<String, Object>(); 
    
    public Map<String, Object> getDynpropertiesMap() {
        return dynpropertiesMap;
    }

    //以下定义备用字段: String型、Long型、Date型各3个
    protected String spareStr1;
    protected String spareStr2;
    protected String spareStr3;
    
    protected Long spareLong1;
    protected Long spareLong2;
    protected Long spareLong3;
    
    protected Date spareDate1;
    protected Date spareDate2;
    protected Date spareDate3;

    public String getSpareStr1() {
        return spareStr1;
    }

    public void setSpareStr1(String spareStr1) {
        this.spareStr1 = spareStr1;
    }

    public String getSpareStr2() {
        return spareStr2;
    }

    public void setSpareStr2(String spareStr2) {
        this.spareStr2 = spareStr2;
    }

    public String getSpareStr3() {
        return spareStr3;
    }

    public void setSpareStr3(String spareStr3) {
        this.spareStr3 = spareStr3;
    }

    public Long getSpareLong1() {
        return spareLong1;
    }

    public void setSpareLong1(Long spareLong1) {
        this.spareLong1 = spareLong1;
    }

    public Long getSpareLong2() {
        return spareLong2;
    }

    public void setSpareLong2(Long spareLong2) {
        this.spareLong2 = spareLong2;
    }

    public Long getSpareLong3() {
        return spareLong3;
    }

    public void setSpareLong3(Long spareLong3) {
        this.spareLong3 = spareLong3;
    }

    public Date getSpareDate1() {
        return spareDate1;
    }

    public void setSpareDate1(Date spareDate1) {
        this.spareDate1 = spareDate1;
    }

    public Date getSpareDate2() {
        return spareDate2;
    }

    public void setSpareDate2(Date spareDate2) {
        this.spareDate2 = spareDate2;
    }

    public Date getSpareDate3() {
        return spareDate3;
    }

    public void setSpareDate3(Date spareDate3) {
        this.spareDate3 = spareDate3;
    }
}